/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package modele;

import java.util.Collection;
import java.util.HashSet;


/**
 *
 * @author sio
 */
public class Pays {
    private Collection<Dep> lesDeps = new HashSet <Dep>();
    
    
    public Pays(){
        lesDeps = DAO.getLesDeps();
    }
    
    public Collection<Dep> getLesDeps(){
        return lesDeps;
    }
    
    public Dep getLeDep(String numDep) {
        for (Dep unDep : lesDeps) {
            if (numDep.equals(unDep.getNum())) {
                return unDep;
            }
        }
        return null;
    }
}
